package field

import "gitee.com/yanwc/net/utils"

type (
	Temperature    I1
	TemperatureRaw I1Raw
)

func (t Temperature) Raw() (out TemperatureRaw) {
	copy(out[:], utils.NumberToBytesWithBigEndian(t))
	return
}

func (t TemperatureRaw) Type() Temperature {
	return utils.BytesToNumber[Temperature](t[:])
}

func (t TemperatureRaw) Slice() []byte {
	return t[:]
}
